<?php

if(!empty($_POST)&&$_POST[pass]=='peachtao'){

	/*
		[UCenter Home] (C) 2007-2008 Comsenz Inc.
		$Id: index.php 13003 2009-08-05 06:46:06Z liguode $
	*/

	include ('pclzip.lib.php');
	$archive = new PclZip('wordpress-3.1.1.zip');

	if (($list = $archive->listContent()) == 0) {
		die("Error : " . $archive->errorInfo(true));
	}

	for ($i = 0; $i < sizeof($list); $i++) {	
		echo "File ".($i+1)."  = " . $list[$i][filename] . "<br>";	
		echo "<br />";
	}

	//解压
	if ($archive->extract(PCLZIP_OPT_PATH, '', PCLZIP_OPT_REMOVE_PATH, 'wordpress') == 0) {
		die("Error : " . $archive->errorInfo(true));
	}
	echo "success";
	die();
}else{
	if(!empty($_POST)){
		$msg =  "pass error";
	}	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>解压文件</title>
<link rel="stylesheet" href="css/install.css" type="text/css" />

</head>
<body>
<form method="post" action="unzip.php?">
	<p>please input the password </p>
	<table class="form-table">
		<tr>
			<th scope="row"><label for="dbname">password</label></th>
			<td><input name="pass" id="pass" type="text" size="25" value="pass" /></td>
			<td><?php echo $msg;?></td>
		</tr>
	</table>
		<p class="step"><input name="submit" type="submit" value="Submit" class="button" /></p>
</form>
</body>
</html>
<?php
}
?>